<extend name="Public/base"/>

<block name="body">
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>
            活动管理
            <button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;"><i class="glyphicon glyphicon-share-alt"></i> 返 回</button>
        </h2>
    </div>

    <div class="tab-content">
    <form action="" method="post" class="form">
          
            <div class="form-item form-group">
                <label class="item-label">标题<span class="check-tips"></span></label>
                <div class="controls">
                    <input type="text" class="text input-small form-control" name="title" value="{$title|htmlspecialchars_decode}">
                </div>
            </div>

            <!-- <div class="form-item form-group cf">
                <label class="item-label">封面<span class="check-tips">(600*338px png/jpg)</span></label>
                <div class="controls">
                    <div class="controls">
                        <input type="file" id="upload_picture_cover">
                        <input type="hidden" name="cover" id="cover_id_cover" value="{$cover}" />
                        <div class="upload-img-box">
                            <notempty name="cover">
                            <div class="upload-pre-item"><img src="{:url_format($cover)}"/></div>
                            </notempty>
                        </div>
                    </div>
                    {:hook('adminPicUpload', array('id'=>"upload_picture_cover",'return'=>"cover_id_cover", 'type' => 'path'))}                                                              
                </div>
            </div> -->

            <div class="form-item form-group">
                <label class="item-label">描述<span class="check-tips"></span></label>
                <div class="controls">
                    <label class="input-large">
                        <textarea class="form-control" rows="4" name="desc">{$desc|htmlspecialchars_decode}</textarea>
                    </label>
                </div>
            </div>
            
            <div class="form-item form-group">
                <label class="item-label">开始时间<span class="check-tips"></span></label>
                <div class="controls">
                    <input type="text" class="text input-small form-control time" name="start_time" value="{$start_time}" placeholder="开始时间">
                </div>
            </div>
            <div class="form-item form-group">
                <label class="item-label">结束时间<span class="check-tips"></span></label>
                <div class="controls">
                    <input type="text" class="text input-small form-control time" name="end_time" value="{$end_time}" placeholder="结束时间">
                </div>
            </div>
            <div class="form-item form-group">
                <label class="item-label">配置<span class="check-tips">使用JSON, </span></label>
                <div class="controls">
                    <label class="input-large">
                        <textarea class="form-control" rows="4" name="config">{$config|default=''|json_encode=###, JSON_UNESCAPED_UNICODE}</textarea>
                    </label>
                </div>
            </div>
            <div class="form-item form-group">
                <label class="item-label">状态<span class="check-tips"></span></label>
                <input type="radio" name="status" value="1"  /> 开启
                <input type="radio" name="status" value="0"  />关闭
            </div>

        <div class="form-item form-group">
            <input type="hidden" name="type" value="randombox">
            <input type="hidden" name="id" value="{$_id}">
            <button class="btn submit-btn ajax-post btn-success btn-block" id="submit" type="submit" target-form="form">确 定</button>
        </div>
    </form>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('index')}');
        showTab();
        $(function(){
            $('.time').datetimepicker({
                format: 'yyyy-mm-dd hh:ii',
                language:"zh-CN",
                minView:0,
                autoclose:true
            });
        });
        Think.setValue("status", '{$status|default=1}');
    </script>
</block>
